
<div xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:a="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:ctg="http://www.crotouristguide.com/taglib">
	<h:form>
		<rich:panel styleClass="blue-panel">
			<ctg:status />
			<s:decorate id="wizar" template="/templates/wizard.xhtml">
				<ui:define name="step-title">#{messages['label.suggest.step.title.4']}</ui:define>
				<ui:define name="wizard-img">
					
				</ui:define>
				<ui:define name="step-tip">#{messages['label.suggest.step.tip.4']}</ui:define>
				<ui:define name="step-form">
					<s:decorate id="tipEmailAdreseDecoration"
						template="/templates/edit.xhtml">
						<ui:define name="label">#{messages['label.email.type']}</ui:define>
						<h:selectOneMenu id="tipEmaila"
							styleClass="field" value="#{objektSuggest.emailAdresa.tipEmailAdrese}"
							required="true">
							<s:selectItems id="tipoviEmailAdrese"
								value="#{objektSuggest.tipoviEmailAdrese}" var="tea"
								label="#{messages[stringUtil.merge('label.email.type.',tea.idTipaEmailAdrese)]}"
								noSelectionLabel="#{messages['label.suggest.selectvalue']}" />
							<s:convertEntity />
						</h:selectOneMenu>
					</s:decorate>
					<s:decorate id="emailDecoration" template="/templates/edit.xhtml">
						<ui:define name="label">#{messages['label.email.email']}</ui:define>
						<h:inputText id="email" styleClass="field"
							value="#{objektSuggest.emailAdresa.email}" required="true">
						</h:inputText>
					</s:decorate>
					<a:commandButton styleClass="submit"
						value="#{messages['label.email.input.button.addemail']}"
						action="#{objektSuggest.dodajEmailAdresu}"
						reRender="tipEmailAdreseDecoration,edataXXX" />


				</ui:define>
				<ui:define name="buttn-cancel">
					<h:commandButton styleClass="submit"
							value="#{messages['label.objekt.input.button.update']}"
							action="#{objektSuggest.zapisiObjekt}" rendered="#{objektSuggest.editMode}" immediate="true"/>	
					<ctg:nbsp/>
					<a:commandButton value="#{messages['label.input.cancel']}"
						action="end" immediate="true" />
				</ui:define>
				<ui:define name="buttn-prev">
					<a:commandButton value="#{messages['label.input.back']}"
						action="#{objektSuggest.previousStep}" reRender="wizardpanel" immediate="true" />
				</ui:define>
				<ui:define name="buttn-next">			
					<a:commandButton value="#{messages['label.input.next']}"
						action="#{objektSuggest.nextStep}" reRender="wizardpanel"
						immediate="true" />
				</ui:define>
				<ui:define name="step-entered-data">
					<s:decorate id="edataXXX">
						<h:dataTable value="#{objektSuggest.uneseneEmailAdrese}" var="uea"
							rendered="#{! empty objektSuggest.uneseneEmailAdrese}" rowClasses="rowOdd,rowEven">
							<f:facet name="header">#{messages['label.email.list.title']}</f:facet>
							<h:column>
								<f:facet name="header">#{messages['label.email.type']}</f:facet>
								<h:outputText value="#{messages[stringUtil.merge('label.email.type.',uea.tipEmailAdrese.idTipaEmailAdrese)]}" />
							</h:column>
							<h:column>
								<f:facet name="header">#{messages['label.email.email']}</f:facet>
								<h:outputText value="#{uea.email}" />
							</h:column>
							<h:column>
								<f:facet name="header">Akcije</f:facet>
								<a:commandLink styleClass="submit"
									value="#{messages['label.button.remove']}"
									action="#{objektSuggest.ukloniEmailAdresu(uea)}" reRender="wizardpanel, tipEmailAdreseDecoration" immediate="true"/>
							</h:column>
						</h:dataTable>
					</s:decorate>
				</ui:define>
			</s:decorate>
		</rich:panel>

	</h:form>

</div>